package com.iflytek.uoamp.agent.core.sender.loggersender.requestobj;

import org.apache.commons.lang3.StringUtils;

public enum SDKLogType {
		
	UNKNOWN("UNKNOWN"),
	TOMCATACCESSLOG("TOMCATACCESSLOG"),
	PROGRAMACCESSLOG("PROGRAMACCESSLOG"),
	OTHER("OTHER");
    
    private String value;
    
    private SDKLogType(String value) {
        this.value = value;
    }
    
    public static SDKLogType getType(String value) {
        if(StringUtils.isBlank(value)) {
            return UNKNOWN;
        }
        
        if("tomcataccesslog".equalsIgnoreCase(value)) {
            return TOMCATACCESSLOG;
        } else if("programaccesslog".equalsIgnoreCase(value)) {
            return PROGRAMACCESSLOG;
        } else if("other".equalsIgnoreCase(value)) {
            return OTHER;
        } else {
            return UNKNOWN;
        }
    }

    public String getValue() {
        return value;
    }
}
